home *** CD-ROM | disk | FTP | other *** search
/ 3D GFX / 3D GFX.iso / pcutils / os2 / show3d / source / ff.cpp < prev    next >
Encoding:
Text File  |  1995-12-31  |  399 b   |  16 lines

  1. /*
  2. You can program your function here.
  3. The value of x will be between -1.5 and 1.5,
  4. the value of x between -2 and 2.
  5. The program should return the value of a continuous
  6. function ff(x,y) at the point (x,y).
  7. This value should be between -0.2 and 0.2.
  8. The function must have the name ff.
  9. */
  10.  
  11. double ff (double x, double y)
  12. {    double z=x*y;
  13.     if (z>1) z=1;
  14.     if (z<-1) z=-1;
  15.     return z*0.2;
  16. }